﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CSharpAlgorithm
{
    class FreeCellStatistics
    {
        public FreeCellStatistics()
        {
            int testCount = Int32.Parse(TestConsole.ReadLine());

            for (int testCase = 1; testCase <= testCount; testCase++)
            {
                string[] input = TestConsole.ReadLine().Split(' ');
                long N = long.Parse(input[0]);
                int Pd = Int32.Parse(input[1]);
                int Pg = Int32.Parse(input[2]);

                bool result = (Pg == 100 && Pd < 100) 
                    || (Pg == 0 && Pd > 0)
                    || (Pd > 0 && 100 / Primes.GCD(Pd, 100) > N);
                Console.WriteLine(string.Format("Case #{0}: {1}", testCase, (!result ? "Possible" : "Broken")));
            }
        }
    }
}
